<?php
/**
 * FastApp.
 * 8/18/24
 * @Author 深色的海 (wx:deepsea_0024)
 * @Contact telegram:deepsea159 
 */

namespace App\Marketing\Api\Controller;

use App\Fastapp\Api\Controller\ApiController;
use App\Marketing\Api\Service\GradientService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller('api/marketing/gradient')]
class GradientController extends ApiController
{

    #[Inject]
    public GradientService $service;

    #[GetMapping('getRefunded')]
    public function getRefunded(): ResponseInterface
    {
        return $this->service->getRefunded((int)$this->request->input('log_id')) ? $this->success() : $this->error();
    }
}